import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class Test02 {
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList<>();
        Collections.addAll(list,"张三","李四","王五","李四","赵六","钱七");
        Random r=new Random();
        int index=r.nextInt(list.size());

    }
}
